package com.mxpio.erp.common.workshop.entity;

import com.mxpio.erp.common.purchase.entity.Supply;
import com.mxpioframework.jpa.annotation.DictAble;
import com.mxpioframework.security.annotation.Dict;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;

@Data
@Entity
@Table(name = "v_mb_erp_workshop_purchasein_unqualified")
@Schema(description="采购入库质检不合格")//采购入库质检不合格
public class VPurchaseinInspectUnqualified implements DictAble, Serializable {
	
	private static final long serialVersionUID = 1L;
	
	@Transient
	private Map<String, String> textMap;

	public String putText(String key, String value) {
		if (textMap == null) {
			textMap = new HashMap<>();
		}
		return textMap.put(key, value);
	}

	@Column(name = "APPLY_ORG_NAME_")
	@Schema(description = "供应商")
	private String applyOrgName;

	@Id
	@Column(name = "APPLY_ORG_CODE_")
	@Schema(description = "供应商编码")
	@Dict(dicCode = "pnCode", dicEntity = Supply.class, dicText = "pnAbbr")
	private String applyOrgCode;


	@Id
	@Column(name = "yearmon")
	@Schema(description = "年月")
	private String yearmon;


	@Column(name = "fail_cnt")
	@Schema(description = "不合格数量")
	private BigDecimal failCnt;

}
